<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <include file="Inc/basic_css"/>
    <include file="Inc/basic_js"/>
    <import type="js" basepath="__JS__" file="admin" />
    <style>
        #ClassAdd{width:97%; margin:0 auto; display:none;}/* height:1px; overflow:hidden; */
        #class_title{ padding:10px 0;}
    </style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<include file="Inc/head"/>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <!-- BEGIN SIDEBAR -->
    <include file="Inc/left"/>
    <!-- END SIDEBAR -->
    <!-- BEGIN PAGE -->
    <div class="page-content">
        <!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
        <!-- BEGIN STYLE CUSTOMIZER -->
        <include file="Inc/theme"/>
        <!-- END BEGIN STYLE CUSTOMIZER -->
        <!-- BEGIN PAGE HEADER-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title">
                    单页管理 <small></small>
                </h3>
                <ul class="page-breadcrumb breadcrumb">
                    <li><i class="fa fa-home"></i><a href="{:U('Index/index')}">首页</a> <i class="fa fa-angle-right"></i></li>
                    <li><a href="#">单页系统</a><i class="fa fa-angle-right"></i></li>
                    <li><a href="#">单页管理</a></li>
                </ul>					<!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet-body">
                    <div class="table-toolbar">
                        <div class="btn-group">
                            
                                <div class="funcform">
								<if condition="$adminLock gt 0">
                                    <a href="{:U('Common/edit?common_id='.$common_id)}" class="btn green"> 新增单页 <i class="fa fa-plus"></i></a>
									</if>
									<a onclick="A_ajax('{:U('Common/create_all')}');" class="btn blue">生成MIP <i class="fa fa-mobile"></i></a>
                                </div>


                        </div>


                    </div>
                    PS：控制器命名，不允许使用'Index','Contact','Msg',不允许与单页或信息系统现有栏目重名，否则修改失败
                    <div role="grid" class="dataTables_wrapper form-inline">
                        <!-- /.row -->
                        <div class="table-scrollable" id="listArea" style="border:0px;">
                                <form method="post" name="myform" id="myform">
                            <table class="table table-striped table-bordered table-advance table-hover">

                                <thead>
                                <tr>
                                    <th align="center"><i class="fa fa-briefcase"></i> ID</th>
                                    <th align="center"><i class="fa fa-user"></i> 单页名称</th>
                                    <if condition="(count($dataList) gt 0) AND ($dataList[0]['common_id'] eq 0)">
                                    <th align="center"><i class="fa fa-shopping-cart"></i> PC控制器</th>
                                    <th align="center"><i class="fa fa-phone"></i> MOBILE控制器</th>
                                    </if>
                                    <th align="center"><i class="fa fa-eraser"></i> 编辑器</th>
                                    <th align="center"><i class="fa fa-picture-o"></i> 图片</th>
                                    <th align="center"><i class="fa fa-info-circle"></i> 简介</th>
                                    <th align="center"><i class="fa fa-reorder"></i> 子集</th>
                                    <th align="center"><i class="fa fa-link"></i> 定向链接</th>
                                    <th align="center"><i class="fa fa-clock-o"></i> 管理操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="dataList" item="item" >
                                    <tr>
                                        <td  align="center" >{$item.id}</td>
                                        <td align="center"  >
                                            {$item.title}
                                            <if condition="$item.childs_count gt 0">
                                                <a href="{:U('Common/index','common_id='.$item['id'])}" class="ckxj" ><font class="baise">查看下级</font></a>
                                            </if>
                                        </td>
                                        <if condition="$item['common_id'] eq 0">
                                            <td align="center"  class="TextTd" name="pc_controller" rel="{$item.id}" isfresh="0" para="input">{$item.pc_controller}</td>
                                            <td align="center"  class="TextTd" name="mob_controller" rel="{$item.id}" isfresh="0" para="input">{$item.mob_controller}</td>
                                        </if>

                                        <td align="center" >{$statusArr[$item['editor_used']]}</td>
                                        <td align="center" >{$statusArr[$item['pic_used']]}</td>
                                        <td align="center" >{$statusArr[$item['introduce_used']]}</td>
                                        <td align="center" >{$item['common_id']?'-':$statusArr[$item['is_childs']]}</td>
                                        <td align="center" ><a href="{:U('Common/manage','id='.$item['id'])}">进入管理</a></td>
                                        <td align="center" ><div class="zznews">
                                                <if condition="$item.common_id eq 0 AND  $adminLock gt 0">
                                                    <a href="{:U('Common/edit','common_id='.$item['id'])}" title="增加下级" class="btn btn-xs green btn-editable"><i class="fa fa-plus"></i>增加下级</a>
                                                </if>
                                                <a href="{:U('Common/edit','id='.$item['id'])}" title="编辑" class="btn btn-xs blue btn-editable"><i class="fa fa-pencil"></i>编辑</a>
                                                <if condition="$adminLock gt 0"><a rel="{:U('Common/del','id='.$item['id'])}" title="删除" onclick="Confirm_ajax($(this).attr('rel'),'确认要删除么？');" class="btn btn-xs red btn-removable"><i class="fa fa-times"></i>删除</a></if>
                                                <if condition="$item.common_id eq 0">
<!--                                                    <a rel="{:U('Common/create_pc?id='.$item['id'])}" title="生成PC页面" class="btn btn-xs dark btn-editable"><i class="fa fa-desktop"></i>生成PC页面</a>
 -->                                                    <a onclick="A_ajax('{:U('Common/create_mob?id='.$item['id'])}')" title="生成mip" class="btn btn-xs yellow btn-editable"><i class="fa fa-mobile-phone"></i>生成mip</a>
                                                </if>
                                            </div>
                                        </td>
                                    </tr>
                                </foreach>
                                </tbody>
                            </table>
                                </form>
                        </div>
                        <div class="row" id="pageArea">
                            {$page}
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <!-- END PAGE CONTENT -->
    </div>

</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<include file="Inc/foot"/>
<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->

<script src="__JS__/app.js" type="text/javascript"></script>
<script src="__JS__/AjaxList.js.php?action=ajaxlistinput&url={:urlencode(U('Common/ajaxListInput'))}"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
    jQuery(document).ready(function() {
        App.init(); // initlayout and core plugins
    });
</script>
<!-- END PAGE LEVEL SCRIPTS -->
</body>
<!-- END BODY -->
</html>